package cn.waqwb.test;

import cn.waqwb.pojo2.School;
import cn.waqwb.pojo2.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Classname MyTest2
 * @Description TODO
 * @Date 2022/9/6 20:12
 * @Created by Administrator
 */
public class MyTest2 {
    @Test
    public void testSchool(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("s02/applicationContext.xml");
        School school = (School) ac.getBean("school");
        System.out.println(school);
    }

    @Test
    public void testStudent(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("s02/applicationContext.xml");
        Student student = (Student) ac.getBean("student");
        System.out.println(student);
    }
}
